import 'package:flutter/material.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';

class AgeSpan extends StatelessWidget {
  final String gender;
  final String age;

  const AgeSpan({super.key, required this.gender, required this.age});

  @override
  Widget build(BuildContext context) {
    return TDTag(
      age,
      iconWidget: Icon(
        gender == '0' ? TDIcons.gender_male : TDIcons.gender_female,
        size: 14,
        color: Colors.white, // 设置图标颜色为白色
      ),
      textColor: Colors.white,
      backgroundColor: gender == '0' ? Colors.purple : Colors.pink,
      shape: TDTagShape.round,
      size: TDTagSize.small,
    );
  }
}
